<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@page import="ext.acae2.statements.*"%>
<%@page import="com.ptc.netmarkets.util.beans.NmCommandBean"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="wt.part.WTPart"%>
<%@page import="java.io.OutputStream"%>
<%@ include file="/netmarkets/jsp/components/beginWizard.jspf"%>
<%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");

response.reset();
response.setContentType("application/vnd.ms-excel");

WTPart part = (WTPart)commandBean.getPrimaryOid().getWtRef().getObject();

String str = part.getContainerName() + "_" + part.getName() + "_" + "产品结构明细表.xls";
str = URLEncoder.encode(str,"utf-8");

response.setHeader("Content-disposition", "attachment; filename=" + str );

out.clear();
out = pageContext.pushBody();
OutputStream output = response.getOutputStream();

StructuralDetail.download(part, output);

out = pageContext.pushBody();

%>
<script>
window.close();
</script>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>